<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<script type="text/javascript" src="${ctx}/webresource/js/jquery.min.js" ></script>
	<script type="text/javascript" src="${ctx}/webresource/js/core.js" ></script>
	<script type="text/javascript" src="${ctx}/webresource/js/aes.js" ></script>
</head>
<body>
	<form action="${ctx}/User/login/phone" method="post">
		key:<input type="text" name="key" value="${userSignupParam.key }" />
		passwd:<input type="text" id="passwd" name="passwd" value="${userSignupParam.passwd }" />
		phone:<input type="text" id="phone" name="phone" value="${userSignupParam.phone }" />

		check:<input type="text" id="check" name="check" value="${userSignupParam.check }" />
		aes.js
		<div>
			<input type="button" value="save" name="save" onclick="submitForm();"/>
			<input type="button" value="cancle" name="cancle" onclick="cancleForm();"/>
		</div>
		<input type="submit" value="save"/>
	</form>

<script type="text/javascript">
	function submitForm() {

		var pwd="我的密码";

		var mi=CryptoJS.AES.encrypt("你好，欢迎来到开源中国在线工具，这是一个AES加密测试",pwd);
		alert("你好，欢迎来到开源中国在线工具，这是一个AES加密测试----密文:"+mi);

		var result=CryptoJS.AES.decrypt(mi,pwd).toString(CryptoJS.enc.Utf8);

		alert("解密结果："+result);

	}


</script>
</body>
</html>